package com.gzcstec.product.controller;

import com.gzcstec.product.dataobject.Girl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务间调用测试server
 */
@RestController
@RequestMapping("/server")
public class ServerController {

    @Autowired
    private Girl girl;

//    @Value("${env}")
//    private String env;
//
//    @GetMapping("/msg")
//    public String getMsg() {
//        return env;
//    }

    @GetMapping("/girl")
    public String getGirl() {
        return "name:"+girl.getName()+";age:"+girl.getAge();
    }

}
